xportethxe 2.2.1
Loading...
Searching...
No Matches
XPort ETH XE Click Driver

API for configuring and manipulating XPort ETH XE Click driver. More...

Topics

 XPort ETH XE Device Settings
 Settings for registers of XPort ETH XE Click driver.
 XPort ETH XE MikroBUS Map
 MikroBUS pin mapping of XPort ETH XE Click driver.

Functions

void xportethxe_cfg_setup (xportethxe_cfg_t *cfg)
 XPort ETH XE configuration object setup function.
err_t xportethxe_init (xportethxe_t *ctx, xportethxe_cfg_t *cfg)
 XPort ETH XE initialization function.
err_t xportethxe_generic_write (xportethxe_t *ctx, uint8_t *data_in, uint16_t len)
 XPort ETH XE data writing function.
err_t xportethxe_generic_read (xportethxe_t *ctx, uint8_t *data_out, uint16_t len)
 XPort ETH XE data reading function.
void xportethxe_send_cmd (xportethxe_t *ctx, uint8_t *cmd)
 XPort ETH XE send cmd function.
void xportethxe_send_enter (xportethxe_t *ctx)
 XPort ETH XE send enter function.
void xportethxe_set_rst_pin (xportethxe_t *ctx, uint8_t state)
 XPort ETH XE set RST pin function.
void xportethxe_set_cts_pin (xportethxe_t *ctx, uint8_t state)
 XPort ETH XE set CTS pin function.
uint8_t xportethxe_get_rts_pin (xportethxe_t *ctx)
 XPort ETH XE get RTS pin function.
uint8_t xportethxe_get_dtr_pin (xportethxe_t *ctx)
 XPort ETH XE get DTR pin function.
void xportethxe_reset_device (xportethxe_t *ctx)
 XPort ETH XE reset device function.

Detailed Description

API for configuring and manipulating XPort ETH XE Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ xportethxe_cfg_setup()

void xportethxe_cfg_setup ( xportethxe_cfg_t * cfg)

XPort ETH XE configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See xportethxe_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ xportethxe_generic_read()

err_t xportethxe_generic_read ( xportethxe_t * ctx,
uint8_t * data_out,
uint16_t len )

XPort ETH XE data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ xportethxe_generic_write()

err_t xportethxe_generic_write ( xportethxe_t * ctx,
uint8_t * data_in,
uint16_t len )

XPort ETH XE data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ xportethxe_get_dtr_pin()

uint8_t xportethxe_get_dtr_pin ( xportethxe_t * ctx)

XPort ETH XE get DTR pin function.

This function returns the DTR pin logic state.

Parameters
[in]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ xportethxe_get_rts_pin()

uint8_t xportethxe_get_rts_pin ( xportethxe_t * ctx)

XPort ETH XE get RTS pin function.

This function returns the RTS pin logic state.

Parameters
[in]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ xportethxe_init()

err_t xportethxe_init ( xportethxe_t * ctx,
xportethxe_cfg_t * cfg )

XPort ETH XE initialization function.

This function initializes all necessary pins and peripherals used for this Click board.

Parameters
[out]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See xportethxe_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ xportethxe_reset_device()

void xportethxe_reset_device ( xportethxe_t * ctx)

XPort ETH XE reset device function.

This function resets device by toggling the RST pin state.

Parameters
[in]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ xportethxe_send_cmd()

void xportethxe_send_cmd ( xportethxe_t * ctx,
uint8_t * cmd )

XPort ETH XE send cmd function.

This function sends a command string by using UART serial interface.

Parameters
[in]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
[in]cmd: Command string to send.
Returns
None.
Note
None.

◆ xportethxe_send_enter()

void xportethxe_send_enter ( xportethxe_t * ctx)

XPort ETH XE send enter function.

This function sends enter (new line) by using UART serial interface.

Parameters
[in]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ xportethxe_set_cts_pin()

void xportethxe_set_cts_pin ( xportethxe_t * ctx,
uint8_t state )

XPort ETH XE set CTS pin function.

This function sets the CTS pin logic state.

Parameters
[in]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ xportethxe_set_rst_pin()

void xportethxe_set_rst_pin ( xportethxe_t * ctx,
uint8_t state )

XPort ETH XE set RST pin function.

This function sets the RST pin logic state.

Parameters
[in]ctx: Click context object. See xportethxe_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.